<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var i = window.prompt('请输入年龄',18);
    if(i>25){
        document.write('欢迎访问');
    }else{
        document.write('未成年.....');
    }
</script>
</body>
</html>